resource "google_iam_workload_identity_pool" "pool" {
  provider                  = google-beta
  workload_identity_pool_id = "<%= ctx[:vars]["workload_identity_pool_id"] %>"
}

resource "google_iam_workload_identity_pool_provider" "<%= ctx[:primary_resource_id] %>" {
  provider                           = google-beta
  workload_identity_pool_id          = google_iam_workload_identity_pool.pool.workload_identity_pool_id
  workload_identity_pool_provider_id = "<%= ctx[:vars]["workload_identity_pool_provider_id"] %>"
  aws {
    account_id = "999999999999"
  }
}
